package me.zingon.doc.service;

import me.zingon.doc.exception.ServiceException;
import me.zingon.doc.model.Project;
import me.zingon.doc.model.User;
import me.zingon.doc.vo.UserVO;

import java.util.List;

/**
* Created by ZTCGenerator<zingon@aliyun.com> on 2018-5-31.
*/
public interface ProjectService {

    int insert(Project project);

    int delete(Project project);

    int deleteByIds(Integer[] ids);

    int update(Project project);

    Project getById(Integer id);

    List<Project> list(Project project);

    List<Project> listByUser(User user);

    int insertWithUser(Project project, User user);

    List<UserVO> listUserByProjectId(Integer projectId);

    UserVO addUser(Integer projectId, String nickname,String power,User user) throws ServiceException;

    int deleteUPByIdWithUser(Integer upId, User user) throws ServiceException;

    int deleteProjectByIdWithUser(Integer projectId, User user) throws ServiceException;
}